package com.mioto.ld.module.device.dao;

import com.mioto.ld.module.device.model.DeviceFunctionLog;
import com.mioto.ld.module.device.model.DeviceFunctionLogPO;
import com.mioto.ld.module.device.model.DeviceFunctionLogPagerVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 *
 * @author mioto
 * @date 2024-05-15 16:13:51
 */
@Mapper
public interface DeviceFunctionLogDao{

    /**
     * 根据条件查询列表
     * @param deviceFunctionLog
     * @return
     */
    List<DeviceFunctionLog> findList(DeviceFunctionLog deviceFunctionLog);

    /**
     * 根据列名和对应的值查询对象
     * @param column
     * @param value
     * @return
     */
    DeviceFunctionLog findByColumn(@Param("column") String column,@Param("value") Object value);

    /**
     * 新增对象
     * @param deviceFunctionLog
     * @return
     */
    int insert(DeviceFunctionLog deviceFunctionLog);

    /**
     * 新增对象,忽略空值
     * @param deviceFunctionLog
     * @return
     */
    int insertIgnoreNull(DeviceFunctionLog deviceFunctionLog);

    /**
     * 修改对象
     * @param deviceFunctionLog
     * @return
     */
    int update(DeviceFunctionLog deviceFunctionLog);

    /**
     * 修改对象,忽略空值
     * @param deviceFunctionLog
     * @return
     */
    int updateIgnoreNull(DeviceFunctionLog deviceFunctionLog);

    /**
     * 根据列名和对应的值删除对象
     * @param column
     * @param value
     * @return
     */
    int deleteByColumn(@Param("column") String column,@Param("value") Object value);

    /**
     * 根据主键列表批量删除
     * @param ids
     * @return
     */
    int batchDelete(Integer[] ids);

    List<DeviceFunctionLogPagerVO> findPager(@Param("deviceId")Integer deviceId,@Param("startTime")String startTime,@Param("endTime")String endTime);

    DeviceFunctionLogPO findIdAndDeviceIdBySnAndIdentity(@Param("deviceSn")String deviceSn, @Param("identity")String identity);
}